<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>7.生命周期函数</title>
    <script src="./vue.global.js"></script>
</head>
<body>
<div id="vueApp"></div>
<script>
    window.app = Vue.createApp({
        data() {
            return {message:'技术胖'};
        },
        beforeCreate() {
            console.log("beforeCreate");
        },
        created() {
            console.log("created");
        },
        beforeMount() {
            console.log("beforeMount");
        },
        mounted() {
            console.log("mounted");
        },
        beforeUpdate() {
            console.log('beforeUpdate')
        },
        updated() {
            console.log('updated')
        },
        beforeUnmount() {
            console.log('beforeUnmount')
        },
        unmounted() {
            console.log('unmounted')
        },
        template:"<h2>{{message}}</h2>",
    });
    window.vm = app.mount("#vueApp");
</script>
</body>
</html>